package net.dnw.practicesummary.home.model;


import net.dnw.practicesummary.home.contract.MainContract;
import net.dnw.practicesummary.mvp.net.HttpResponse;
import net.dnw.practicesummary.mvp.base.BaseModel;
import net.dnw.practicesummary.home.observable.MainServices;

import io.reactivex.Observable;

/**
 * Created by Administrator on 2019/2/22 0022.
 */

public class MainModelImpl extends BaseModel<MainServices> implements MainContract.MainModel {

    public MainModelImpl() {
        super();
    }
    @Override
    public Observable<HttpResponse> getDataFromNet() {
        return request.getTest();
    }

    @Override
    public void onDestory() {
        request = null;
    }

    @Override
    public MainServices createService() {
        return  retrofit.create(MainServices.class);
    }
}
